local skel = fk.CreateSkill {
  name = "#kunwu_sword_skill",
  attached_equip = "kunwu_sword",
}

skel:addEffect(fk.CardEffectCancelledOut, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and data.from == player and data.card.trueName == "slash" and
      not data.to.dead
  end,
  on_cost = function(self, event, target, player, data)
    if player.room:askToSkillInvoke(player, {skill_name = skel.name, prompt = "#kunwu_sword-invoke::"..data.to.id}) then
      event:setCostData(self, {tos = {data.to}})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:loseHp(player, 1, skel.name)
    local to = data.to
    if not to.dead then
      room:loseHp(to, 1, skel.name)
    end
    data.isCancellOut = false
  end,
})

Fk:loadTranslationTable{
  ["#kunwu_sword_skill"] = "锟铻剑",
  ["#kunwu_sword-invoke"] = "锟铻剑：你可以与 %dest 各失去1点体力，令其抵消的【杀】仍然生效",
}

return skel
